    require.config({  
        paths: {  
            echarts: 'http://echarts.baidu.com/build/dist'  
        }  
    });  
    require(  
            [  
                'big_area_map/map/js/echarts',
                'echarts/chart/bar'  
            ],  
            function (ec) {  
                var myChart = ec.init(document.getElementById('bar'));  
                
                var gender;
                $(function(){
                    $('.Gender1').selectOrDie({
                        prefix: "性别： ",
                        onChange: function(){
                            gender=$(this).val();
                            editData(gender);
                        }
                    });
                });             
      

          
                var mIncredence30 = [
                    {name:'前列腺癌', value: 0.01},
                    {name:'结直肠癌', value: 0.11},
                    {name:'食道癌', value: 0.02},
                    {name:'肝癌', value: 0.44},
                    {name:'胃癌', value: 0.19},
                    {name:'肺癌', value: 0.13}
                ];
                 var mMortality30 = [
                    {name:'前列腺癌', value: 0.01},
                    {name:'结直肠癌', value: 0.05},
                    {name:'食道癌', value: 0.01},
                    {name:'肝癌', value: 0.35},
                    {name:'胃癌', value: 0.13},
                    {name:'肺癌', value: 0.08}
                ];
                var mIncredence44 = [
                    {name:'前列腺癌', value: 0.01},
                    {name:'结直肠癌', value: 1.2},
                    {name:'食道癌', value: 0.74},
                    {name:'肝癌', value: 4.13},
                    {name:'胃癌', value: 1.58},
                    {name:'肺癌', value: 1.58}
                ];
                var mMortality44 = [
                    {name:'前列腺癌', value: 0.14},
                    {name:'结直肠癌', value: 0.5},
                    {name:'食道癌', value: 0.42},
                    {name:'肝癌', value: 3.25},
                    {name:'胃癌', value: 0.8},
                    {name:'肺癌', value: 1}
                ];
                var mIncredence59 = [
                    {name:'前列腺癌', value: 0.34},
                    {name:'结直肠癌', value: 5.8},
                    {name:'食道癌', value: 8.9},
                    {name:'肝癌', value: 13.04},
                    {name:'胃癌', value: 13.41},
                    {name:'肺癌', value: 12.2}
                ];
                var mMortality59 = [
                    {name:'前列腺癌', value: 1.01},
                    {name:'结直肠癌', value: 2.25},
                    {name:'食道癌', value: 5.6},
                    {name:'肝癌', value: 11.19},
                    {name:'胃癌', value: 7.47},
                    {name:'肺癌', value: 8.85}
                ];
                var mIncredence74 = [
                    {name:'前列腺癌', value: 2.42},
                    {name:'结直肠癌', value: 9.09},
                    {name:'食道癌', value: 16.13},
                    {name:'肝癌', value: 11.61},
                    {name:'胃癌', value: 23.27},
                    {name:'肺癌', value: 23.18}
                ];
                var mMortality74 = [
                    {name:'前列腺癌', value: 1.93},
                    {name:'结直肠癌', value: 4.16},
                    {name:'食道癌', value: 12.13},
                    {name:'肝癌', value: 10.64},
                    {name:'胃癌', value: 16.06},
                    {name:'肺癌', value: 18.87}
                ];
                var mIncredence75 = [
                    {name:'前列腺癌', value: 3.24},
                    {name:'结直肠癌', value: 5.27},
                    {name:'食道癌', value: 6.29},
                    {name:'肝癌', value: 5.16},
                    {name:'胃癌', value: 9.32},
                    {name:'肺癌', value: 13.84}
                ];
                var mMortality75 = [
                    {name:'前列腺癌', value: 1.46},
                    {name:'结直肠癌', value: 4.15},
                    {name:'食道癌', value: 7.21},
                    {name:'肝癌', value: 5.63},
                    {name:'胃癌', value: 9.47},
                    {name:'肺癌', value: 14.45}
                ];
                var fIncredence30 = [
                    {name:'甲状腺癌', value:0.61 },
                    {name:'宫颈癌', value: 0.15},
                    {name:'结直肠癌', value: 0.11},
                    {name:'胃癌', value: 0.1},
                    {name:'肺癌', value: 0.07},
                    {name:'乳腺癌', value: 0.43}
                ];
                var fMortality30 = [
                    {name:'甲状腺癌', value: 0.05},
                    {name:'宫颈癌', value: 0.03},
                    {name:'结直肠癌', value: 0.07},
                    {name:'胃癌', value: 0.01},
                    {name:'肺癌', value: 0.06},
                    {name:'乳腺癌', value: 0.03}
                ];
                var fIncredence44 = [
                    {name:'甲状腺癌', value: 2.05},
                    {name:'宫颈癌', value: 2.82},
                    {name:'结直肠癌', value: 1.01},
                    {name:'胃癌', value: 1.15},
                    {name:'肺癌', value: 1.09},
                    {name:'乳腺癌', value: 5.55}
                ];
                var fMortality44 = [
                    {name:'甲状腺癌', value: 0.87},
                    {name:'宫颈癌', value: 0.34},
                    {name:'结直肠癌', value: 0.58},
                    {name:'胃癌', value: 0.14},
                    {name:'肺癌', value: 0.52},
                    {name:'乳腺癌', value: 0.58}
                ];
                var fIncredence59 = [
                    {name:'甲状腺癌', value: 2.78},
                    {name:'宫颈癌', value: 4.57},
                    {name:'结直肠癌', value: 4.07},
                    {name:'胃癌', value: 4.92},
                    {name:'肺癌', value: 5.39},
                    {name:'乳腺癌', value: 12.87}
                ];
                var fMortality59 = [
                    {name:'甲状腺癌', value: 2.83},
                    {name:'宫颈癌', value: 1.37},
                    {name:'结直肠癌', value: 2.69},
                    {name:'胃癌', value: 1.91},
                    {name:'肺癌', value: 2.92},
                    {name:'乳腺癌', value: 3.25}
                ];
                var fIncredence74 = [
                    {name:'甲状腺癌', value: 1.13},
                    {name:'宫颈癌', value: 1.9},
                    {name:'结直肠癌', value: 6.42},
                    {name:'胃癌', value: 8.96},
                    {name:'肺癌', value: 9.12},
                    {name:'乳腺癌', value: 6.23}
                ];
                var fMortality74 = [
                    {name:'甲状腺癌', value: 1.88},
                    {name:'宫颈癌', value: 2.74},
                    {name:'结直肠癌', value: 4.48},
                    {name:'胃癌', value: 5.61},
                    {name:'肺癌', value: 6.65},
                    {name:'乳腺癌', value: 6.97}
                ];
                var fIncredence75 = [
                    {name:'甲状腺癌', value: 0.21},
                    {name:'宫颈癌', value: 0.45},
                    {name:'结直肠癌', value: 4.44},
                    {name:'胃癌', value: 5},
                    {name:'肺癌', value: 6.74},
                    {name:'乳腺癌', value: 1.78}
                ];
                var fMortality75 = [
                    {name:'甲状腺癌', value: 1.32},
                    {name:'宫颈癌', value: 3.51},
                    {name:'结直肠癌', value: 3.32},
                    {name:'胃癌', value: 4.45},
                    {name:'肺癌', value: 5.72},
                    {name:'乳腺癌', value: 6.94}
                ];
                option = {  
                    timeline:{  
                        axisType: 'category',
                        type: 'number',
                        data:[  
                            '<30','30-44','45-59','60-74','>=75' 
                        ],   
                        autoPlay : true,  
                        playInterval : 1000  
                    },  
                    options:[  
                        {  
                            title : {  
                                'text':'小于30岁'
                            },  
                            tooltip : {'trigger':'axis'},  
                            legend : {  
                                x:'center',  
                                'data':['发病人数','死亡人数'],  
                                'selected':{  
                                    '发生率':true,  
                                    '死亡率':false
                                }  
                            },   
                            calculable : true,  
                            grid : {'y':80,'y2':100},  
                            xAxis : [{  
                                'type':'category',  
                                'axisLabel':{'interval':0},  
                                'data':[  
                                    '前列腺癌','结直肠癌','食道癌','肝癌','胃癌','肺癌'
                                ]  
                            }],  
                            yAxis : [  
                                {  
                                    'type':'value',  
                                    'name':'人数（万人）',  
                                    'max':1  
                                } 
                            ],  
                            series : [  
                                {  
                                    'name':'发病人数', 'type':'bar',  
                                    'data': mIncredence30  
                                },  
                                {  
                                    'name':'死亡人数','type':'bar',  
                                    'data': mMortality30
                                }
                            ]  
                        },  
                        {  
                            yAxis : [  
                                {  
                                    'type':'value',  
                                    'name':'人数（万人）',  
                                    'max':6  
                                } 
                            ],
                            title : {'text':'30-44岁'},  
                            series : [  
                                {'data': mIncredence44},  
                                {'data': mMortality44}  
                            ]  
                        },  
                        {  
                            yAxis : [  
                                {  
                                    'type':'value',  
                                    'name':'人数（万人）',  
                                    'max':15  
                                } 
                            ],
                            title : {'text':'44-59岁'},  
                            series : [  
                                {'data': mIncredence59},  
                                {'data': mMortality59}
                            ]  
                        },  
                        {  
                            yAxis : [  
                                {  
                                    'type':'value',  
                                    'name':'人数（万人）',  
                                    'max':25 
                                } 
                            ],
                            title : {'text':'60-74岁'},  
                            series : [  
                                {'data': mIncredence74},  
                                {'data': mMortality74}
                            ]  
                        },
                        {  
                            yAxis : [  
                                {  
                                    'type':'value',  
                                    'name':'人数（万人）',  
                                    'max':15  
                                } 
                            ],
                            title : {'text':'75岁及以上'},  
                            series : [  
                                {'data': mIncredence75},  
                                {'data': mMortality75}
                            ]  
                        }
                    ]  
                };  
                function editData(){
                    var gender = arguments[0];
                    if(gender == 2){
                        option.options[0].xAxis[0].data = ['甲状腺癌','宫颈癌','结直肠癌','胃癌','肺癌','乳腺癌'];
                        option.options[0].series[0].data = fIncredence30;
                        option.options[0].series[1].data = fMortality30;
                        option.options[1].series[0].data = fIncredence44;
                        option.options[1].series[1].data = fMortality44;
                        option.options[2].series[0].data = fIncredence59;
                        option.options[2].series[1].data = fMortality59;
                        option.options[3].series[0].data = fIncredence74;
                        option.options[3].series[1].data = fMortality74;
                        option.options[4].series[0].data = fIncredence75;
                        option.options[4].series[1].data = fMortality75;
                    }else if(gender ==1){
                        option.options[0].xAxis[0].data = ['前列腺癌','结直肠癌','食道癌','肝癌','胃癌','肺癌'];  
                        option.options[0].series[0].data = mIncredence30;
                        option.options[0].series[1].data = mMortality30;
                        option.options[1].series[0].data = mIncredence44;
                        option.options[1].series[1].data = mMortality44;
                        option.options[2].series[0].data = mIncredence59;
                        option.options[2].series[1].data = mMortality59;
                        option.options[3].series[0].data = mIncredence74;
                        option.options[3].series[1].data = mMortality74;
                        option.options[4].series[0].data = mIncredence75;
                        option.options[4].series[1].data = mMortality75;
                    }
                }
  
                myChart.setOption(option);  
            }  
    );  